From: Colin Walters Date: Thu, 12 Oct 2017 14:46:25 +0000 (-0400) Subject: lib/deltas: Check cancellable during processing X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~4^2~30^2~60 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=a1986b1a8083ef4f840973f1c73d932a52e43644;p=ostree.git lib/deltas: Check cancellable during processing Let's react to `Ctrl-C` faster here. Noticed while I was doing an update on my desktop and playing with cancellation. Closes: #1266 Approved by: jlebon --- diff --git a/src/libostree/ostree-repo-static-delta-processing.c b/src/libostree/ostree-repo-static-delta-processing.c index 6d00e79f..84fed682 100644 --- a/src/libostree/ostree-repo-static-delta-processing.c +++ b/src/libostree/ostree-repo-static-delta-processing.c @@ -229,6 +229,9 @@ _ostree_static_delta_part_execute (OstreeRepo *repo, state->oplen--; state->opdata++; + if (g_cancellable_set_error_if_cancelled (cancellable, error)) + goto out; + switch (opcode) { case OSTREE_STATIC_DELTA_OP_OPEN_SPLICE_AND_CLOSE: